<?php 
	function http_curl(){
		//获取imooc
		//初始化curl
		$ch = curl_init();
		// https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxcdf1a04d60663136&secret=3d27120e73b4dccf0cd2b20baf49eb2d
		$url = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxcdf1a04d60663136&secret=3d27120e73b4dccf0cd2b20baf49eb2d';
		//设置curl的参数
		curl_setopt($ch, CURLOPT_URL, $url);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
		//采集
		$output = curl_exec($ch);
		curl_close($ch);
		print_r($output) ;
	}
	http_curl();

 ?>